import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from "axios";

// 1. 在每个请求地址前添加一个/api
axios.defaults.baseURL = '/api'
Vue.config.productionTip = false
Vue.use(ElementUI);
// 2. 在每个vue实例分配一件动态变量$axios,这样，在每个vue实例中可以通过this.$axios来访问axios
Vue.prototype.$axios = axios;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
